#!/usr/bin/node

var request = require('request');
var url='http://api.twitter.com/1/statuses/public_timeline.json';
request(url, function(error,response,body) {
    if(!error && response.statusCode == 200) {
      var json = JSON.parse(body);
      for(var i in json) {
	user = json[i].user.id_str;
	autor = json[i].user.name;
	console.log("Usuario: "+autor+" con id: "+user);
      }
      //console.log(json);
    } else {
      console.log(error);
    }
});